package day06;

import java.util.Random;

public class ArrayDemo05 {
    public static void main(String[] args) {
        int[] a = new int[10];
        a[0] = 1;
        double[] b = new double[10];
        b[0] = 1.4;
        // 二维数组
        int[][] c = new int[5][];
        c[0]= new int[5];
        c[1]= new int[3];
        c[2]= new int[4];
        c[3]= new int[5];
        c[4]= new int[6];
        c[1][2]=5;
        c[4][2]=7;
        System.out.println(c[4][2]);
        System.out.println(c[1][2]);
        System.out.println(c.length);// c数组的长度
        System.out.println(c[1].length);//c[1] 第二层数组

        int[][] b1 = new int[5][4];
        Random r = new Random();
        for (int i = 0; i < b1.length; i++) {
            for (int j = 0; j < b1[i].length; j++) {
                b1[i][j]=r.nextInt(100);
            }
        }
        for (int i = 0; i < b1.length; i++) {
            for (int j = 0; j < b1[i].length; j++) {
                System.out.print(b1[i][j]+" ");
            }
            System.out.println();
        }


    }
}
